using System;
using System.Collections.Generic;
using System.Text;

namespace SDMX_ML.Framework.Common
{
   

    public class TextType
    {
        private const string DEFAULT_LANGUAGE = "en";

        //public TextType(){}

        /// <summary>
        /// Texttype with text and language.
        /// </summary>
        /// <param name="text">Text.</param>
        /// <param name="language">Language in the format en, dk, gb, us etc.</param>
        public TextType(string text, string language)
        {
            _text = text;

            if (String.IsNullOrEmpty(language))
            {
                _lang = DEFAULT_LANGUAGE;
            }
            else
            {
                _lang = language;
            }
        }

        /// <summary>
        /// Texttype with default language en.
        /// </summary>
        /// <param name="text">Text.</param>
        public TextType(string text)
        {
            _text = text;
            _lang = DEFAULT_LANGUAGE;
        }

        private string _text;

        public string Text
        {
            get { return _text; }
            set { _text = value; }
        }
        private string _lang;

        public string Lang
        {
            get { return _lang; }
            set { _lang = value; }
        }

    }
}
